package com.example.config;

import com.example.conditional.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * Created by joe on 17-4-21.
 */
@Configuration
public class ConditionConfig {
  @Bean
  @Conditional(WindowsCondition.class)
  public ListService windowsListService(){
    return new WindowsService();
  }

  @Bean
  @Conditional(LinuxCondition.class)
  public ListService linuxListService(){
    return new LinuxService();
  }
}
